package com.wd.jetpack.demo.paging.model

import android.os.Build
import androidx.annotation.RequiresApi
import java.util.*

/**
 * NA<BR></BR>
 *
 * @author W4255
 * @version [V0.0.1, 2021/6/29]
 * @Description: NA
 */
class Movie {
    private var id = 0
    private var title: String? = null
    private var rate: String? = null
    private var cover: String? = null
    private var content: String? = null

    fun getCover(): String? {
        return cover
    }

    fun setCover(cover: String?) {
        this.cover = cover
    }

    fun getTitle(): String? {
        return title
    }

    fun setTitle(title: String?) {
        this.title = title
    }

    fun getContent(): String? {
        return content
    }

    fun setContent(content: String?) {
        this.content = content
    }

    override fun toString(): String {
        return "Movie{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", rate='" + rate + '\'' +
                ", cover='" + cover + '\'' +
                '}'
    }

    override fun equals(o: Any?): Boolean {
        if (this === o) return true
        if (o == null || javaClass != o.javaClass) return false
        val movie = o as Movie
        return id == movie.id &&
                title == movie.title &&
                rate == movie.rate &&
                cover == movie.cover
    }

    @RequiresApi(Build.VERSION_CODES.KITKAT)
    override fun hashCode(): Int {
        return Objects.hash(id, title, rate, cover)
    }
}